home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 023a / managr.zip / FILE-MAN.ASI next >
Text File  |  1992-01-07  |  30KB  |  1,625 lines

  1. rem FILE-MAN.COM
  2.  
  3. rem consecutive to wait22:
  4.  
  5. rem initialize Esc key.  This is necessary because some parameters go directly 
  6. rem to a routine; if it wasn't initialized here, it would have to be re-
  7. rem initialized in every routine in which it was used.  CHR$(27) is the ASCII 
  8. rem code for the Esc key.
  9.  
  10. b$=chr$(27)
  11.  
  12. rem initialize Enter (Return) key.  Same reason as the Esc key initialization, 
  13. rem but applies mainly to the error routines.  CHR$(13) is the ASCII code for 
  14. rem the Enter (Return) key.
  15.  
  16. c$=chr$(13)
  17.  
  18. rem Again, for the error routines, initialize the Backspace key and space bar.
  19.  
  20. d$=chr$(8)
  21. e$=chr$(32)
  22. lf$=chr$(10)
  23. crlf$=c$+lf$
  24. rem a=csrline (this is reserved in the subroutine CURSOR:)
  25. rem b=pos(0) (also reserved in CURSOR: subroutine)
  26. rem c=b-1 (reserved in CURSOR: subroutine)
  27.  
  28. rem This program requires approximately 68K of RAM.
  29.  
  30. rem Now, check for parameters.  The first set is for 80-column mode.
  31.  
  32. a$=command$
  33. if a$=" /?" then help:
  34. if a$=" /d" then killfile:
  35. if a$=" /D" then killfile:
  36. if a$=" /m" then makedir:
  37. if a$=" /M" then makedir:
  38. if a$=" /n" then renfile:
  39. if a$=" /N" then renfile:
  40. if a$=" /g" then timedate:
  41. if a$=" /G" then timedate:
  42.  
  43. if a$=" /b" then
  44. gosub blankscr:
  45. goto menu:
  46. endif
  47.  
  48. if a$=" /B" then
  49. gosub blankscr:
  50. goto menu:
  51. endif
  52.  
  53. if a$=" /p" then chckgrph:
  54. if a$=" /P" then chckgrph:
  55.  
  56. if a$=" /s" then
  57. call ("seefiles.com","")
  58. goto menu:
  59. endif
  60.  
  61. if a$=" /S" then
  62. call ("seefiles.com","")
  63. goto menu:
  64. endif
  65.  
  66. if a$=" /v" then readfile:
  67. if a$=" /V" then readfile:
  68. if a$=" /l" then printfil:
  69. if a$=" /L" then printfil:
  70.  
  71. rem This set of parameters is for 40-column mode.
  72.  
  73. if a$=" /40" then menu40:
  74. if a$=" /40 ?" then help40:
  75. if a$=" /40 d" then killfl40:
  76. if a$=" /40 D" then killfl40:
  77. if a$=" /40 m" then makedr40:
  78. if a$=" /40 M" then makedr40:
  79. if a$=" /40 n" then renfil40:
  80. if a$=" /40 N" then renfil40:
  81. if a$=" /40 g" then timedt40:
  82. if a$=" /40 G" then timedt40:
  83.  
  84. if a$=" /40 b" then
  85. gosub blankscr:
  86. goto menu40:
  87. endif
  88.  
  89. if a$=" /40 B" then
  90. gosub blankscr:
  91. goto menu40:
  92. endif
  93.  
  94.  
  95. if a$=" /40 s" then
  96. call ("seefiles.com","/40")
  97. goto menu40:
  98. endif
  99.  
  100. if a$=" /40 S" then
  101. call ("seefiles.com","/40")
  102. goto menu40:
  103. endif
  104.  
  105. if a$=" /40 l" then prfile40:
  106. if a$=" /40 L" then prfile40:
  107.  
  108. rem If no parameters, begin from the beginning.
  109.  
  110. rem Set up and print intro screen.
  111.  
  112.  
  113. cls
  114. print "                       The ASIC File Manager, Version 2.00"
  115. print
  116. print
  117. print "                                By Matt Roberts"
  118. print "                                3 Cedar St., #8"
  119. print "                           Montpelier, Vt 05602-3006"
  120. print "                                 (802)223-2553"
  121. print
  122. print
  123. print "          If you find the programs on this disk useful, a donation of"
  124. print "                 $5.00 would be greatly appreciated.  Thanks."
  125. print
  126. print
  127. print "           If you're having trouble using this program, you can call"
  128. print "               between 9AM and 9PM (EST), and I'll try to help."
  129. print
  130. print
  131. print
  132. print
  133. print
  134. print
  135. print
  136. print "Press any key to continue. ";
  137. gosub continue:
  138. rem Intro screen is now printed.
  139.  
  140. rem Here's the Caveat.
  141.  
  142. cls
  143. print "Please note: I am not in any way connected to ASIC or its author,"
  144. print "David A. Visti, except as a registered user and ardent fan.  Inquiries"
  145. print "regarding ASIC, and registration fees for that compiler, should be"
  146. print "sent to:"
  147. print
  148. print
  149. print "David Visti, P.O. Box 2952, Raleigh, NC 27602-2952."
  150. print
  151. print
  152. print "I urge you to consider ASIC, and to register it if you use it."
  153. print "Thanks."
  154. print
  155. print
  156. print
  157. print
  158. print
  159. print
  160. print
  161. print "Press any key to continue. ";
  162. gosub continue:
  163.  
  164.  
  165. rem Now direct the program to create a menu of options.
  166.  
  167. rem Here is the menu of options.
  168.  
  169. menu:
  170. cls
  171. print "                                 Your Options"
  172. print
  173. print
  174. print "F1- View Files.                      F10- Read file."
  175. print
  176. print "F2- Delete Files.                    <Alt-F1>- Print file."
  177. print
  178. print "F3- Make Directory.                  <Alt-F2>- See DOS Parameters."
  179. print
  180. print "F4- Rename Files.                    <Alt-F3>- Work with CONFIG.SYS."
  181. print
  182. print "F5- Get Time/Date.                   <Alt-F4>- Work with AUTOEXEC.BAT."
  183. print
  184. print "F6- Shell to DOS.                    <Alt-F5>- Run Other Programs."
  185. print
  186. print "F7- Blank Screen.                    <Alt-F6>- Remove Directory."
  187. print
  188. print "F8- Check for Graphics Card.         N- Next Menu."
  189. print
  190. print "F9- Change to 40-column mode.        Esc- Quit and Return to DOS."
  191. print
  192. print
  193. print "Please press the key corresponding to your choice. ";
  194.  
  195. wait2:
  196. gosub continue:
  197.  
  198. if a$=b$ then
  199. cls
  200. end
  201. endif
  202.  
  203. if a$="n" then menu2:
  204. if a$="N" then menu2:
  205.  
  206. if extended=0 then wait2:
  207.  
  208. if a$=";" then
  209. call ("seefiles.com","")
  210. endif
  211.  
  212. if a$="<" then killfile:
  213. if a$="=" then makedir:
  214. if a$=">" then renfile:
  215. if a$="?" then timedate:
  216. if a$="@" then shelldos:
  217.  
  218. if a$="A" then
  219. gosub blankscr:
  220. endif
  221.  
  222. if a$="B" then chckgrph:
  223. if a$="C" then menu40:
  224. if a$="D" then readfile:
  225. if a$="h" then printfil:
  226. if a$="i" then help:
  227.  
  228. if a$="j" then
  229. call ("config.bas","")
  230. endif
  231.  
  232. if a$="k" then
  233. call ("autoexec.bas","")
  234. endif
  235.  
  236. if a$="l" then runother:
  237. if a$="m" then removedr:
  238. goto wait2:
  239.  
  240. menu2:
  241. cls
  242. print "                                 More Options"
  243. print
  244. print
  245. print "<Alt-F7>- Copy a file."
  246. print
  247. print "<Alt-F8>- Move a file."
  248. print
  249. print "F- First Menu."
  250. print
  251. print "Esc- Quit and Return to DOS."
  252. print
  253. print
  254. print "Please press the key corresponding to your choice. ";
  255. gosub continue:
  256.  
  257. wait:
  258.  
  259. if a$=b$ then
  260. cls
  261. end
  262. endif
  263.  
  264. if a$="f" then menu:
  265. if a$="F" then menu:
  266. if extended=0 then wait:
  267.  
  268. if a$="n" then copyfile:
  269. if a$="o" then movefile:
  270. goto wait:
  271.  
  272.  
  273.  
  274.  
  275. rem Here is the routine for deleting files.
  276.  
  277. killfile:
  278. cls
  279. print "                                 Delete Files"
  280. print
  281. print
  282. print "Before going any further, you should be aware that, once a file has"
  283. print "been deleted, it is very difficult to retrieve it.  From this program,"
  284. print "it is impossible; I lack the skill to make an undelete feature"
  285. print "available."
  286. print
  287. print
  288. print "Press any key to continue, or Esc to quit. ";
  289.  
  290. wait4:
  291. gosub continue:
  292. if a$=b$ then menu:
  293.  
  294. deletagn:
  295. cls
  296. print "                                 Delete Files"
  297. print
  298. print
  299. spaces$=space$(68)
  300. print spaces$;
  301. color 0,7
  302. print "Esc=Quit"
  303. color 7,0
  304. print "File to delete? ";
  305. gosub retypefi:
  306. print ""
  307. print ""
  308. print ""
  309. print "All the data in ";
  310. print realfile$;
  311. print " will be destroyed."
  312. print
  313. print
  314. print "Press any key to continue, or Esc to quit. ";
  315.  
  316. wait5:
  317. gosub continue:
  318. if a$=b$ then menu:
  319. rekill:
  320. kill file$
  321. if error=2 then nofilekf:
  322. if error=5 then illeglkf:
  323. print ""
  324. print ""
  325. print realfile$;
  326. print " has been deleted."
  327. file$=""
  328. print
  329. print "Delete another? (y/n) ";
  330.  
  331. wait6:
  332. gosub continue:
  333. if a$="y" then deletagn:
  334. if a$="Y" then deletagn:
  335. if a$="n" then menu:
  336. if a$="N" then menu:
  337. goto wait6:
  338.  
  339. rem This is the end of the routine for deleting files.
  340.  
  341.  
  342.  
  343. rem Here is the routine for making a directory.
  344.  
  345. makedir:
  346. cls
  347. print "                               Make a Directory"
  348. print
  349. print
  350. spaces$=space$(68)
  351. print spaces$;
  352. color 0,7
  353. print "Esc=Quit"
  354. color 7,0
  355. print "Type directory name (include drive and path). ";
  356. gosub retypefi:
  357. directory$=file$
  358.  
  359. remakedr:
  360. mkdir directory$
  361. if error=3 then nopathmd:
  362. if error=5 then illeglmd:
  363. print ""
  364. print ""
  365. realdir$=ucase$(directory$)
  366. print "You have created directory: ";
  367. print realdir$
  368. directory$=""
  369. print
  370. print
  371. print "Would you like to make another directory? (y/n) ";
  372.  
  373. wait7:
  374. gosub continue:
  375. if a$="y" then makedir:
  376. if a$="Y" then makedir:
  377. if a$="n" then menu:
  378. if a$="N" then menu:
  379. goto wait7:
  380.  
  381. rem This is the end of the routine for making directories.
  382.  
  383.  
  384.  
  385. rem Here is the routine for renaming files.
  386.  
  387. renfile:
  388. cls
  389. print "                                 Rename Files"
  390. print
  391. print
  392. spaces$=space$(68)
  393. print spaces$;
  394. color 0,7
  395. print "Esc=Quit"
  396. color 7,0
  397. print "Name of file to change (include drive and path)? ";
  398. gosub retypefi:
  399. file1$=file$
  400. realfile1$=ucase$(file1$)
  401.  
  402. dofile2:
  403. print ""
  404. print ""
  405. print ""
  406. print "New name for ";
  407. print realfil1$;
  408. print "? ";
  409. file$=""
  410. gosub retypefi:
  411.  
  412. file2$=file$
  413. realfil2$=ucase$(file2$)
  414.  
  415. refile:
  416. name file1$ as file2$
  417. if error=2 then nofilerf:
  418. if error=3 then nopathrf:
  419. if error=5 then illeglrf:
  420. if error=17 then diffdrrf:
  421. print ""
  422. print ""
  423. print realfil1$;
  424. print " has been renamed ";
  425. print realfil2$;
  426. print "."
  427. file1$=""
  428. file2$=""
  429. print
  430. print "Rename another? (y/n) ";
  431.  
  432. wait8:
  433. gosub continue:
  434. if a$="y" then renfile:
  435. if a$="Y" then renfile:
  436. if a$="n" then menu:
  437. if a$="N" then menu:
  438. goto wait8:
  439.  
  440.  
  441. rem This is the end of the routine for renaming files.
  442.  
  443.  
  444.  
  445. rem Here is the routine for getting the time and/or date.
  446.  
  447.  
  448. timedate:
  449.  
  450. cls
  451. print "                             Get Time and/or Date."
  452. print
  453. print
  454. print "Here are your options:"
  455. print
  456. print
  457. print "F1- Get the time."
  458. print
  459. print "F2- Get the date."
  460. print
  461. print "F3- Get Both."
  462. print
  463. print "Esc- Return to the Main Options Menu."
  464. print
  465. print
  466. print
  467. print "Please press the key corresponding to your choice. ";
  468.  
  469. wait20:
  470. gosub continue:
  471. if a$=b$ then menu:
  472. if extended=0 then wait20:
  473.  
  474. if a$=";" then gettime:
  475. if a$="<" then getdate:
  476. if a$="=" then getboth:
  477. goto wait20:
  478.  
  479. gettime:
  480.  
  481. cls
  482. print "                                 Get the Time."
  483. print
  484. print
  485. print "In order for this feature to work, the time in your computer must be"
  486. print "set properly, either manually or with the Real-Time-Clock."
  487. print
  488. print
  489. print
  490. print
  491. print
  492.  
  493. a$=time$
  494. f$=mid$(a$,1,2)
  495. d=val(f$)
  496.  
  497. if d>12 then
  498. d=d-12
  499. h$=" PM"
  500. else
  501. h$=" AM"
  502. endif
  503.  
  504. if d=12 then 
  505. h$=" PM"
  506. endif
  507.  
  508. e=d
  509. g$=str$(e)
  510. i$=mid$(a$,3,6)
  511. j$=g$+i$
  512. k$=ltrim$(j$)
  513. print "The time is now: ";
  514. print k$;
  515. print h$
  516. print
  517. print
  518. print "Press any key to continue. ";
  519. gosub continue:
  520. goto timedate:
  521.  
  522. getdate:
  523.  
  524. cls
  525. print "                                 Get the Date"
  526. print
  527. print
  528. print "In order for this feature to work properly, the date in your computer"
  529. print "must be set properly.  If it isn't, you may get a weird date."
  530. print
  531. print
  532. print
  533. print
  534. print
  535. a$=date$
  536. print "Today's date is ";
  537. print a$
  538. print
  539. print
  540. print "Press any key to continue. ";
  541. gosub continue:
  542. goto timedate:
  543.  
  544. getboth:
  545.  
  546. cls
  547. print "                                   Get Both"
  548. print
  549. print
  550. print "In order for this feature to work, both your time and date must be set"
  551. print "properly.  If they aren't, you may get some weird answers.  If you"
  552. print "have problems, check your manual to find out how to set the time and"
  553. print "date from DOS."
  554. print
  555. print
  556. print
  557. print
  558. print
  559. a$=time$
  560. f$=mid$(a$,1,2)
  561. d=val(f$)
  562.  
  563. if d>12 then
  564. d=d-12
  565. h$=" PM"
  566. else
  567. h$=" AM"
  568. endif
  569.  
  570. if d=12 then
  571. h$=" PM"
  572. endif
  573.  
  574. e=d
  575. g$=str$(e)
  576. i$=mid$(a$,3,6)
  577. j$=g$+i$
  578. k$=ltrim$(j$)
  579. print "The time is now: ";
  580. print k$;
  581. print h$
  582. print
  583. print
  584. f$=date$
  585. print "Today's date is ";
  586. print f$
  587. print
  588. print
  589. print "Press any key to continue. ";
  590. gosub continue:
  591. goto timedate:
  592.  
  593.  
  594. rem This is the end of the routine for getting the time and/or date.
  595.  
  596.  
  597.  
  598. rem Here is the routine for shelling to DOS.
  599.  
  600. shelldos:
  601.  
  602. cls
  603. print "                                 Shell to DOS"
  604. print
  605. print
  606. print "On which drive is your COMMAND.COM (don't type the colon)? ";
  607.  
  608. wait9:
  609. gosub continue:
  610. print a$
  611. path$=a$+":\command.com"
  612. cls
  613. print "Use the DOS command EXIT to return to the File Manager."
  614. print
  615. call path$,""
  616. if error=255 then nocall:
  617. goto menu:
  618.  
  619. rem This is the end of the routine for shelling to DOS.
  620.  
  621.  
  622.  
  623. rem Here is the routine for blanking your screen.
  624.  
  625. blankscr:
  626. cls
  627. locate 81,81
  628. gosub continue:
  629. return
  630.  
  631. rem This is the end of the routine for blanking your screen.
  632.  
  633.  
  634.  
  635. rem Here is the routine for checking for a graphics card.
  636.  
  637. chckgrph:
  638. cls
  639. print "                         Check for a Graphics Adaptor"
  640. print
  641. print
  642. print "This program only has the ability to check whether or not you have a"
  643. print "graphics adapter.  It can't tell you what kind of adapter you have"
  644. print "at this time."
  645. print
  646. print
  647. print
  648. d=zmode
  649. if d=1 then graphics: else nogrphcs:
  650.  
  651. graphics:
  652. print "You have a graphics adapter installed."
  653. print
  654. print
  655. print "Press any key to continue. ";
  656. gosub continue:
  657. goto menu:
  658.  
  659. nogrphcs:
  660. print "There is no graphics adapter installed.  However, you may be able to"
  661. print "access special line-drawing characters for making menus, as well as"
  662. print "some other characters (such as smiley faces).  Check your DOS or word"
  663. print "processing manual for details."
  664. print
  665. print
  666. print "Press any key to continue. ";
  667. gosub continue:
  668. goto menu:
  669.  
  670. rem This is the end of the routine for checking for a graphics card.
  671.  
  672.  
  673.  
  674. rem Here are the screens for accessing FILE-MAN from DOS with parameters 
  675. rem (80 columns).
  676.  
  677. help:
  678. cls
  679. print "You can use arguments with the File Manager if you wish; they may help"
  680. print "save you time."
  681. print
  682. print
  683. print "Just typing FILE-MAN at the DOS prompt will start the File Manager from" 
  684. print "the beginning; you can choose your options from the menu."
  685. print
  686. print "Typing FILE-MAN /? gives you this help screen."
  687. print
  688. print "Typing FILE-MAN /d moves you directly to the Delete Files option."
  689. print
  690. print "Typing FILE-MAN /m moves you directly to the Make Directory option."
  691. print
  692. print "Typing FILE-MAN /n moves you directly to the Rename Files option."
  693. print
  694. print "Typing FILE-MAN /g moves you directly to the Get Date option."
  695. print
  696. print "Typing FILE-MAN /b blanks your screen."
  697. print
  698. print "Typing FILE-MAN /p checks for a graphics adaptor."
  699. print
  700. print
  701. print "Press any key to continue. ";
  702. gosub continue:
  703. cls
  704. print "Typing FILE-MAN /s lets you see a list of disk files."
  705. print
  706. print "Typing FILE-MAN /v lets you view the text file of your choice, on the"
  707. print "screen."
  708. print
  709. print "Typing FILE-MAN /l lets you print a file on the lineprinter."
  710. print
  711. print
  712. print "Upper or lower case makes no difference."
  713. print
  714. print
  715. print "Do you want to ";
  716. color 0,15
  717. print "C";
  718. color 7,0
  719. print "ontinue with the File Manager or Return to ";
  720. color 0,15
  721. print "D";
  722. color 7,0
  723. print "OS? ";
  724. print
  725. print
  726. print "Please press the key corresponding to your choice. ";
  727.  
  728. wait11:
  729. gosub continue:
  730. if a$="c" then menu:
  731. if a$="C" then menu:
  732.  
  733. if a$="d" then
  734. cls
  735. end
  736. endif
  737.  
  738. if a$="D" then
  739. cls
  740. end
  741. endif
  742.  
  743. goto wait11:
  744.  
  745. rem This is the end of the routine for the list of DOS parameters.
  746.  
  747.  
  748. rem Here is the routine for reading a file.
  749.  
  750. readfile:
  751. cls
  752. print "                                  Read a File"
  753. print
  754. print
  755. spaces$=space$(68)
  756. print spaces$;
  757. color 0,7
  758. print "Esc=Quit"
  759. color 7,0
  760. print "Please type the name of the file you want to read."
  761. print "Include drive and path. ";
  762. gosub retypefi:
  763. print ""
  764. print ""
  765. print "To pause the scrolling, press the space bar.  To quit, press Esc."
  766. print
  767. print
  768. print "While the file should be readable, formatting may not be quite"
  769. print "correct."
  770. print
  771. print
  772. print "Press any key to continue. ";
  773. gosub continue:
  774. a$=""
  775.  
  776. cls
  777.  
  778. reread:
  779. open "i",1,file$
  780.  
  781. if error=2 then
  782. gosub nofilerd:
  783. goto reread:
  784. endif
  785.  
  786. if error=3 then nopathrd:
  787.  
  788. readmore:
  789. input# 1, line$ crlf
  790.  
  791. if error=96 then
  792. print line$
  793. line=line+1
  794. if line=23 then
  795. print "Press any key to continue. ";
  796. gosub continue:
  797. print
  798. print
  799. line=0
  800. cls
  801. endif
  802. gosub blanklnr:
  803. endif
  804.  
  805. line=line+1
  806.  
  807. if line=23 then
  808. print ""
  809. print "Press any key to continue. ";
  810. gosub continue:
  811. print
  812. print
  813.  
  814. if a$=b$ then
  815. line=0
  816. file$=""
  817. close 1
  818. print
  819. print
  820. print "Do you want to view another file? (y/n) ";
  821. goto wait56:
  822. endif
  823.  
  824. line=0
  825. cls
  826. endif
  827.  
  828. print line$
  829.  
  830. a$=inkey$
  831. if a$=e$ then
  832. print "Press any key to continue. ";
  833. gosub continue:
  834. print
  835. print
  836. endif
  837.  
  838. if a$=b$ then
  839. file$=""
  840. line=0
  841. close 1
  842. print
  843. print
  844. print "Do you want to view another file? (y/n) ";
  845. goto wait56:
  846. endif
  847.  
  848. if error=99 then eof:
  849. goto readmore:
  850.  
  851. blanklnr:
  852. input# 1, line$ crlf
  853. if line$="" then readmore:
  854. return
  855.  
  856. eof:
  857. print line$
  858. print "Press any key to continue. ";
  859. gosub continue:
  860. print
  861. print
  862. line=0
  863. file$=""
  864. close 1
  865. print
  866. print
  867. print "Do you want to view another file? (y/n) ";
  868.  
  869. wait56:
  870. gosub continue:
  871. if a$="y" then readfile:
  872. if a$="Y" then readfile:
  873. if a$="n" then menu:
  874. if a$="N" then menu:
  875. goto wait56:
  876.  
  877. rem This is the end of the routine for reading text files.
  878.  
  879.  
  880. rem Here is the routine for printing text files.
  881.  
  882. printfil:
  883.  
  884. cls
  885. print "                                 Print a File"
  886. print
  887. print
  888. spaces$=space$(68)
  889. print spaces$;
  890. color 0,7
  891. print "Esc=Quit"
  892. color 7,0
  893. print "Please type the name of the file you want to print."
  894. print
  895. print "Include the drive and path. ";
  896. gosub retypefi:
  897.  
  898. doprintf:
  899. f$=chr$(12)
  900. open "i",1,file$
  901.  
  902. if error=2 then
  903. gosub nofilerd:
  904. goto doprintf:
  905. endif
  906.  
  907. if error=3 then nopathpr:
  908.  
  909. heading:
  910. cls
  911. print "Printing...";
  912. realfile$=ucase$(file$)
  913. color 0,7
  914. print realfile$
  915. color 7,0
  916. print
  917. print
  918. print "Press space bar to pause printing, or Esc to quit."
  919. print
  920. print
  921.  
  922. printmor:
  923. input# 1, line$ crlf
  924.  
  925. if error=96 then
  926. lprint line$
  927. goto blanklin:
  928. endif
  929.  
  930. contlprn:
  931. lprint line$
  932.  
  933. a$=inkey$
  934.  
  935. if a$=b$ then
  936. print "Printing has been terminated.  The printer may still have data in its"
  937. print "buffer.  If so, it will continue printing until the buffer is empty."
  938. lprint f$
  939. close 1
  940. file$=""
  941. print
  942. print
  943. print "Print another file? (y/n) ";
  944. goto wait13:
  945. endif
  946.  
  947. if a$=e$ then
  948. print "Press any key to resume printing. ";
  949. gosub continue:
  950. endif
  951.  
  952. if error=99 then eofp:
  953. goto printmor:
  954.  
  955. blanklin:
  956. input# 1, line$ crlf
  957. if line$="" then printmor: else contlprn:
  958.  
  959. eofp:
  960. lprint line$
  961. print "Finished."
  962. close 1
  963. lprint f$
  964. file$=""
  965. print
  966. print
  967. print "Print another file? (y/n) ";
  968.  
  969. wait13:
  970. gosub continue:
  971. if a$="y" then printfil:
  972. if a$="Y" then printfil:
  973. if a$="n" then menu:
  974. if a$="N" then menu:
  975. goto wait13:
  976.  
  977.  
  978. rem This is the end of the routine for printing text files.
  979.  
  980.  
  981. rem Here is the routine for running other programs.
  982.  
  983. runother:
  984. cls
  985. spaces$=space$(68)
  986. print spaces$;
  987. color 0,7
  988. print "Esc=Quit"
  989. color 7,0
  990. print
  991. print "Please type the full name of the program you want to run (for example,"
  992. print "MYPROGRM.COM).  Include the drive and path."
  993.  
  994. gosub retypefi:
  995.  
  996. print ""
  997. print "You can specify an argument to your program, but it must be one phrase"
  998. print "(no spaces).  Do you want to specify an argument (y/n)";
  999.  
  1000. wait25:
  1001. gosub continue:
  1002. if a$="y" then getargum:
  1003. if a$="Y" then getargum:
  1004.  
  1005. if a$="n" then
  1006. argument$=""
  1007. goto dorunoth:
  1008. endif
  1009.  
  1010. if a$="N" then
  1011. argument$=""
  1012. goto dorunoth:
  1013. endif
  1014.  
  1015. goto wait25:
  1016.  
  1017. getargum:
  1018. cls
  1019. spaces$=space$(68)
  1020. print spaces$;
  1021. color 0,7
  1022. print "Esc=Quit"
  1023. color 7,0
  1024. print
  1025. print "Please type the argument you'd like to use.  It can only be one phrase"
  1026. print "and cannot contain any spaces. ";
  1027.  
  1028. dorunoth:
  1029. argument$=file$
  1030. argument$=e$+argument$
  1031. call file$,argument$
  1032. file$=""
  1033. argument$=""
  1034. cls
  1035. print "Would you like to run another program (y/n)? ";
  1036.  
  1037. wait30:
  1038. gosub continue:
  1039. if a$="y" then runother:
  1040. if a$="Y" then runother:
  1041. if a$="n" then menu:
  1042. if a$="N" then menu:
  1043. goto wait30:
  1044.  
  1045. rem This is the end of the routine for running other programs.
  1046.  
  1047.  
  1048. rem Here is the routine for removing directories.
  1049.  
  1050. removedr:
  1051. cls
  1052. print "                              Remove Directories"
  1053. print
  1054. print
  1055. spaces$=space$(68)
  1056. print spaces$;
  1057. color 0,7
  1058. print "Esc=Quit"
  1059. color 7,0
  1060. print
  1061. print "Before you can remove a directory, you must remove all files in that"
  1062. print "directory, and in its subdirectories.  You must then remove all sub-"
  1063. print "directories."
  1064. print
  1065. print
  1066.  
  1067. removagn:
  1068. print "Please type the name of the directory you'd like to remove.  Include"
  1069. print "the drive and path. ";
  1070. gosub retypefi:
  1071. directory$=file$
  1072.  
  1073. reremove:
  1074. rmdir directory$
  1075. realfile$=ucase$(directory$)
  1076. print ""
  1077. print ""
  1078. print realfile$;
  1079. print " has been removed."
  1080. print ""
  1081. print ""
  1082. print "Would you like to remove another directory? ";
  1083.  
  1084. wait40:
  1085. gosub continue:
  1086. if a$="y" then removagn:
  1087. if a$="Y" then removagn:
  1088. if a$="n" then menu:
  1089. if a$="N" then menu:
  1090. goto wait40:
  1091.  
  1092. rem This is the end of the routine for removing directories.
  1093.  
  1094.  
  1095. rem Here is the routine for copying text files.
  1096.  
  1097. copyfile:
  1098. cls
  1099. print "                                   Copy File"
  1100. print
  1101. print
  1102. print "*****PLEASE NOTE***** Only text files will copy properly using this"
  1103. print "method.  Files with an extension of .EXE, .COM, or which contain other"
  1104. print "special characters will usually not copy properly."
  1105. print
  1106. print "Press any key to continue. ";
  1107. gosub continue:
  1108.  
  1109. copymore:
  1110. cls
  1111. spaces$=space$(68)
  1112. print spaces$;
  1113. color 0,7
  1114. print "Esc=Quit"
  1115. color 7,0
  1116. print
  1117. print "File to copy (include drive and path)? ";
  1118. gosub retypefi:
  1119. file1$=file$
  1120. file$=""
  1121. realfil1$=ucase$(file1$)
  1122.  
  1123. print ""
  1124. print "Destination (include drive and path)? ";
  1125. gosub retypefi:
  1126. file2$=file$
  1127. realfil2$=ucase$(file2$)
  1128.  
  1129. open "i",1,file1$
  1130. open "o",2,file2$
  1131.  
  1132. wait3:
  1133. input # 1, line$ crlf
  1134. if error=99 then copydone:
  1135.  
  1136. if error=96 then
  1137. print # 2, line$ nonull
  1138. input # 1, line$ crlf
  1139. if line$="" then
  1140. print # 2, crlf$ nonull
  1141. goto wait3:
  1142. endif
  1143. endif
  1144.  
  1145. print # 2, line$ nonull
  1146. print # 2, crlf$ nonull
  1147. goto wait3:
  1148.  
  1149. copydone:
  1150. close 1
  1151. close 2
  1152. print ""
  1153. print ""
  1154. print realfil1$;
  1155. print " has been copied to ";
  1156. print realfil2$;
  1157. print "."
  1158. print
  1159. print "Copy another? ";
  1160.  
  1161. wait46:
  1162. gosub continue:
  1163. if a$="y" then copymore:
  1164. if a$="Y" then copymore:
  1165. if a$="n" then menu2:
  1166. if a$="N" then menu2:
  1167. goto wait46:
  1168.  
  1169. rem This is the end of the routine for copying a text file.
  1170.  
  1171.  
  1172. rem Here is the routine for moving text files.
  1173.  
  1174. movefile:
  1175. cls
  1176. print "                                   Move File"
  1177. print
  1178. print
  1179. print "*****PLEASE NOTE***** Only text files will move properly using this"
  1180. print "method.  Files with an extension of .EXE, .COM, or which contain other"
  1181. print "special characters will usually not move properly.  In addition, this"
  1182. print "option is destructive, destroying the original file.  You are urged"
  1183. print "to make backups before attempting any procedure which can change a"
  1184. print "file."
  1185. print
  1186. print "Press Esc to quit, or any other key to continue. ";
  1187. gosub continue:
  1188. if a$=b$ then menu2:
  1189.  
  1190. movemore:
  1191. cls
  1192. spaces$=space$(68)
  1193. print spaces$;
  1194. color 0,7
  1195. print "Esc=Quit"
  1196. color 7,0
  1197. print "File to copy (include drive and path)? ";
  1198. gosub retypefi:
  1199. file1$=file$
  1200. realfil1$=ucase$(file1$)
  1201. file$=""
  1202.  
  1203. print ""
  1204. print "Destination (include drive and path)? ";
  1205. gosub retypefi:
  1206. file2$=file$
  1207. realfil2$=ucase$(file2$)
  1208. file$=""
  1209.  
  1210. domove:
  1211. open "i",1,file1$
  1212. open "o",2,file2$
  1213.  
  1214. wait26:
  1215. input # 1, line$ crlf
  1216. if error=99 then movedone:
  1217.  
  1218. if error=96 then
  1219. print # 2, line$ nonull
  1220. input # 1, line$ crlf
  1221. if line$="" then
  1222. print # 2, crlf$ nonull
  1223. goto wait26:
  1224. endif
  1225. endif
  1226.  
  1227. print # 2, line$ nonull
  1228. print # 2, crlf$ nonull
  1229. goto wait26:
  1230.  
  1231. movedone:
  1232. close 1
  1233. close 2
  1234. kill file1$
  1235. print ""
  1236. print ""
  1237. print realfil1$;
  1238. print " has been moved to ";
  1239. print realfil2$;
  1240. print "."
  1241. print
  1242. print "Move another? ";
  1243.  
  1244. wait29:
  1245. gosub continue:
  1246. if a$="y" then movemore:
  1247. if a$="Y" then movemore:
  1248. if a$="n" then menu2:
  1249. if a$="N" then menu2:
  1250. goto wait29:
  1251.  
  1252. rem This is the end of the routine for moving a file.
  1253.  
  1254.  
  1255. rem Here is the routine for typing in files in 80-column mode.
  1256.  
  1257. retypefi:
  1258. gosub continue:
  1259.  
  1260. if a$=b$ then
  1261. file$=""
  1262. file1$=""
  1263. file2$=""
  1264. goto menu:
  1265. endif
  1266.  
  1267. if a$=c$ then
  1268. return
  1269. endif
  1270.  
  1271. gosub cursor:
  1272.  
  1273. if a$=d$ then
  1274. locate a,c
  1275. print e$;
  1276. locate a,c
  1277. d=len(file$)
  1278. e=d-1
  1279. file$=mid$(file$,1,e)
  1280. if e<0 then
  1281. e=0
  1282. c=c+1
  1283. locate a,c
  1284. endif
  1285. if b=0 then
  1286. a=a-1
  1287. b=79
  1288. locate a,b
  1289. print e$;
  1290. locate a,b
  1291. endif
  1292. goto retypefi:
  1293. endif
  1294.  
  1295. print a$;
  1296. file$=file$+a$
  1297. realfile$=ucase$(file$)
  1298. goto retypefi:
  1299.  
  1300. rem This is the end of the routine for typing in files in 80-column mode.
  1301.  
  1302.  
  1303. rem Here is the routine for typing in files in 40-column mode.
  1304.  
  1305. retypf40:
  1306. gosub continue:
  1307.  
  1308. if a$=b$ then
  1309. file$=""
  1310. file1$=""
  1311. file2$=""
  1312. goto menu40:
  1313. endif
  1314.  
  1315. if a$=c$ then
  1316. return
  1317. endif
  1318.  
  1319. gosub cursor:
  1320.  
  1321. if a$=d$ then
  1322. locate a,c
  1323. print e$;
  1324. locate a,c
  1325. d=len(file$)
  1326. e=d-1
  1327. file$=mid$(file$,1,e)
  1328. if e<0 then
  1329. e=0
  1330. c=c+1
  1331. locate a,c
  1332. endif
  1333. if b=0 then
  1334. a=a-1
  1335. b=38
  1336. locate a,b
  1337. print e$;
  1338. locate a,b
  1339. endif
  1340. goto retypf40:
  1341. endif
  1342.  
  1343. print a$;
  1344. file$=file$+a$
  1345. goto retypf40:
  1346.  
  1347. rem This is the end of the routine for typing in files in 40-column mode.
  1348.  
  1349.  
  1350. rem Here is the routine for continuing when the user presses a key.
  1351.  
  1352. continue:
  1353. a$=inkey$
  1354. if a$="" then continue:
  1355. return
  1356.  
  1357. rem This is the end of the routine for continuing when the user presses a key.
  1358.  
  1359.  
  1360. rem Here is the subroutine for initializing row/column position of cursor.
  1361.  
  1362. cursor:
  1363. a=csrlin
  1364. b=pos(0)
  1365. c=b-1
  1366. return
  1367.  
  1368. rem This is the end of the routine for initializing cursor position.
  1369.  
  1370.  
  1371. rem Here is the routine for generating 40-column width for visually impaired
  1372. rem people.
  1373. rem In order to make certain the screen writes are readable, the entire program 
  1374. rem is essentially rewritten in this module.
  1375.  
  1376. menu40:
  1377. width 40
  1378. print "Your Options:"
  1379. print
  1380. print
  1381. print "F1- View Your Files."
  1382. print
  1383. print "F2- Delete Files."
  1384. print
  1385. print "F3- Make a directory."
  1386. print
  1387. print "F4- Rename Files."
  1388. print
  1389. print "F5- Get the Time/Date."
  1390. print
  1391. print "F6- Shell to DOS."
  1392. print
  1393. print "F7- Blank Your Screen."
  1394. print
  1395. print "F8- Next menu."
  1396. print
  1397. print "Esc- Quit."
  1398. print
  1399. print
  1400. print "Please press the key corresponding to"
  1401. print "your choice. ";
  1402.  
  1403. wait12:
  1404. gosub continue:
  1405.  
  1406. if a$=b$ then
  1407. cls
  1408. end
  1409. endif
  1410.  
  1411. if extended=0 then wait12:
  1412.  
  1413. if a$=";" then
  1414. call ("seefiles.com","/40")
  1415. endif
  1416.  
  1417. if a$="<" then killfl40:
  1418. if a$="=" then makedr40:
  1419. if a$=">" then renfil40:
  1420. if a$="?" then timedt40:
  1421. if a$="@" then shell40:
  1422.  
  1423. if a$="A" then
  1424. gosub blankscr:
  1425. endif
  1426.  
  1427. if a$="B" then 2dmenu40:
  1428. goto wait12:
  1429.  
  1430. 2dmenu40:
  1431. cls
  1432. print "Here are your remaining options:"
  1433. print
  1434. print
  1435. print "F1- Change to 80-column mode."
  1436. print
  1437. print "F2- Print file."
  1438. print
  1439. print "F3- Return to the first menu."
  1440. print
  1441. print "F4- See a list of parameters you can"
  1442. print "use from DOS."
  1443. print
  1444. print "Esc- Quit."
  1445. print
  1446. print
  1447. print "Please press the key corresponding to"
  1448. print "your choice. ";
  1449.  
  1450. wait58:
  1451. gosub continue:
  1452.  
  1453. if a$=b$ then
  1454. cls
  1455. end
  1456. endif
  1457.  
  1458. if extended=0 then wait58:
  1459.  
  1460. if a$=";" then
  1461. width 80
  1462. goto menu:
  1463. endif
  1464.  
  1465. if a$="<" then prfile40:
  1466. if a$="=" then menu40:
  1467. if a$=">" then help40:
  1468. goto wait58:
  1469.  
  1470.  
  1471. rem Here is the routine for deleting files in 40-column mode.
  1472.  
  1473. killfl40:
  1474. width 40
  1475. print "Delete Files"
  1476. print
  1477. print
  1478. print "Before going any further, you should"
  1479. print "be aware that, once a file has been"
  1480. print "deleted, it is very difficult to"
  1481. print "retrieve it.  From this program, it is"
  1482. print "impossible; I lack the skill to make"
  1483. print "an undelete feature available."
  1484. print
  1485. print
  1486. print "Press any key to continue, or Esc to"
  1487. print "quit. ";
  1488.  
  1489. gosub continue:
  1490. if a$=b$ then menu40:
  1491.  
  1492. delagn40:
  1493. cls
  1494. print "Delete Files"
  1495. print
  1496. print
  1497. spaces$=space$(30)
  1498. print spaces$;
  1499. color 0,7
  1500. print "Esc=Quit"
  1501. color 7,0
  1502. print "File to delete? ";
  1503. gosub retypf40:
  1504. realfile$=ucase$(file$)
  1505.  
  1506. print ""
  1507. print ""
  1508. print ""
  1509. print "All the data in ";
  1510. print realfile$;
  1511. print " will be de-"
  1512. print "stroyed."
  1513. print
  1514. print
  1515. print "Press any key to continue, or Esc to"
  1516. print "quit. ";
  1517.  
  1518. gosub continue:
  1519. if a$=b$ then menu40:
  1520.  
  1521. rekill40:
  1522. kill file$
  1523. if error=2 then noflkf40:
  1524. if error=5 then ilglkf40:
  1525. print ""
  1526. print ""
  1527. print realfile$;
  1528. print " has been deleted."
  1529. file$=""
  1530. print
  1531. print "Delete another? (y/n) ";
  1532.  
  1533. wait15:
  1534. gosub continue:
  1535. if a$="y" then delagn40:
  1536. if a$="Y" then delagn40:
  1537. if a$="n" then menu40:
  1538. if a$="N" then menu40:
  1539. goto wait15:
  1540.  
  1541. rem This is the end of the routine for deleting files in 40-column mode.
  1542.  
  1543.  
  1544.  
  1545. rem Here is the routine for making a directory in 40-column mode.
  1546.  
  1547. makedr40:
  1548. width 40
  1549. print "Make a Directory"
  1550. print
  1551. print
  1552. spaces$=space$(30)
  1553. print spaces$;
  1554. color 0,7
  1555. print "Esc=Quit"
  1556. color 7,0
  1557. print "Directory name (include drive and"
  1558. print "path)? ";
  1559. gosub retypf40:
  1560. directory$=file$
  1561. realdir$=ucase$(directory$)
  1562.  
  1563. remake40:
  1564. mkdir directory$
  1565. if error=3 then nopIfFint "tination (include drive and path)? ";
  1566. gosub retypefi:
  1567. file2$=f le:
  1568. c7Skectory"
  1569. print
  1570. print realfile$;
  1571. print # 2, line$ nonull
  1572. print # 2, crlf$ nonull
  1573. goto wait26:
  1574. ctoryi files will copy properly using this"
  1575. print "method.  Files with an extension of .EXE, .COM, or which contain other"
  1576. print "special characters will usually not copy properly."
  1577. print
  1578. print "Press any key to continue. ";
  1579. gosub continue:
  1580.  
  1581. copymore:
  1582. cls
  1583. spaces$=space$(68)
  1584. print spaces$;
  1585. color 0,7
  1586. prinmkdir directon mot realfile$;
  1587. print 1in40:
  1588. i bese$(file1$)
  1589.  
  1590. print ""
  1591. print "Destination (are urged"
  1592. print "to make backups before attempting any procedu  """
  1593. kror=3 thet spaces$st oe drive and path)?cls
  1594. spaces$=space$(68)
  1595. print spaces$;
  1596. color 0,7
  1597. prinmkdir diri:
  1598. file2$=file$
  1599. realfil2$=ucase$(file2$)
  1600.  
  1601. open "i",1,file1$
  1602. lf
  1603. if error=99 then copydone:
  1604.  
  1605. if error=96 then
  1606. print # 2, line$ nonull
  1607. input # 1, line$ crlf
  1608. if line$="" then
  1609. print # 2, ccrlf$ nonull
  1610. goto wait3:
  1611. endif
  1612. endif
  1613.  
  1614. print # 2, line$ nonu{ ""
  1615. file/;
  1616. gobhen tiint " h a,th an ext
  1617. copydone:
  1618. close 1
  1619. close 2
  1620. print ""
  1621. print ""
  1622. print realfil1$:
  1623. if a$="=" then menu40:
  1624. if a$=">" then help40:
  1625. goto wait5 menu2 ying the original file.  You are u